<div class="row">
    <div class="col-md-12">
        <div class="card">
            <div class="card-header card-header-inverse">
                <h4 class="card-header-title">
                    帐号管理
                </h4>
            </div>
            <div class="card-content table-full-width">
                <div class="toolbar">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-xs-12 col-md-7">
                                <div class="row">
                                    <div class="col-md-3">
                                        <div class="form-group label-floating is-empty">
                                            <label class="control-label"></label>
                                            <input type="text" class="form-control form-control-sm" data-provide="datepicker" id="startDate" placeholder="开始日期">
                                        </div>
                                    </div>
                                    <div class="col-md-3">
                                        <div class="form-group label-floating is-empty">
                                            <label class="control-label"></label>
                                            <input type="text" class="form-control form-control-sm" data-provide="datepicker" id="finishDate" placeholder="结束日期">
                                        </div>
                                    </div>
                                    <div class="col-md-3 text-left">
                                        <div class="form-group label-floating is-empty" style="margin-top: 8%">
                                            <label class="control-label"></label>
                                            <button class="btn btn-primary btn-sm" data-options='{"target":"RESET"}'>
                                                <i class="fa fa-search fa-fw"></i>查 找
                                            </button>
                                            <button class="btn btn-warning btn-sm" data-options='{"target":"RESET"}'>
                                                <i class="fa fa-recycle fa-fw"></i>重 置
                                            </button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xs-12 col-md-5">
                                <div class="form-group label-floating is-empty" style="margin-top: 3%">
                                    <label class="control-label"></label>
                                    <?php foreach ($citem as $key=>$value) :?>
                                        <button class="btn btn-<?= $value['Style']?> btn-sm" data-options='<?= $value['Options']?>' data-title="<?= $value['Title']?>">
                                            <i class="fa fa-<?= $value['Icon']?>"></i> <?= $value['Title']?>
                                        </button>
                                    <?php endforeach;?>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="material-datatables">
                    <table id="datatables" data-url="<?= $module->RouteURL?>" class="table table-striped table-hover display responsive nowrap" cellspacing="0" width="100%">
                        <thead>
                        <tr class="text-danger">
                            <th>ID</th>
                            <th>登录帐号</th>
                            <th>所属角色</th>
                            <th>启用状态</th>
                            <th>登录时间</th>
                            <th>登录地址</th>
                        </tr>
                        </thead>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(function () {
        $("#datatables").createPager([{
            data: "MasterId",
            className: 'text-center'
        }, {
            data: "UserName",
            className: "text-center",
            render: function (data, type, row, meta) {
                return window.cutString(data, 12);
            }
        }, {
            data: "RoleName",
            className: "text-center",
            render: function (data, type, row, meta) {
                return window.cutString(data, 12);
            }
        }, {
            data: "UserState",
            className: "text-center",
            render: function (data, type, row, meta) {
                return data == 0 ? "<i class=\"fa fa-check text-success\"></i>" : "<i class=\"fa fa-times text-danger\"></i>";
            }
        }, {
            data: "LoginDate",
            className: "text-center",
            render: function (data, type, row, meta) {
                //return common.dateForamtToString(eval('new ' + data.substr(1, data.length - 2)), "yyyy-MM-dd HH:mm:ss");
                return data;
            }
        }, {
            data: "LoginIP",
            className: "text-center",
            render: function (data, type, row, meta) {
                return data;
            }
        }]);
    });
</script>